package com.navi.loaddata.core.gpEntity;

import javax.persistence.*;

import com.alibaba.fastjson.annotation.JSONField;
import com.navi.loaddata.core.entity.BaseEntity;

import java.sql.Date;
import java.sql.Timestamp;
import java.util.Objects;

/**
 * Created by fw_06 on 2018/1/17.
 */
@Entity
@Table(name = "wpp_cunit_his", schema = "sor", catalog = "qmstst")
@IdClass(WppCunitHisPK.class)
public class WppCunitHis extends BaseEntity{
    private String unqSeqId;
    @JSONField(name = "etlTimestamp", format = "yyyy-MM-dd HH:mm:ss")
    private Timestamp etlTimestamp;
    private String etlEventNode;
    private String etlEventName;
    private String etlEvtSeqId;
    private String glassId;
    private int opeKey;
    private String opeId;
    private int shopKeyFk;
    private String shopId;
    private int prodKey;
    private String prodId;
    private String eqptId;
    private String subEqptId;
    private String unitEqptId;
    private String eqptPortId;
    private String recipeId;
    private String acRecipeId;
    private String evtCate;
    private String evtUsr;
    @JSONField(name = "inTimestamp", format = "yyyy-MM-dd HH:mm:ss")
    private Timestamp inTimestamp;
    @JSONField(name = "outTimestamp", format = "yyyy-MM-dd HH:mm:ss")
    private Timestamp outTimestamp;
    @JSONField(name = "evtTimestamp", format = "yyyy-MM-dd HH:mm:ss")
    private Timestamp evtTimestamp;
    private String evtNote;
    private String baseId;
    @JSONField(name = "mesTimestamp", format = "yyyy-MM-dd HH:mm:ss")
    private Timestamp mesTimestamp;
    private String lotId;
    private String carrierName;
    private Integer position;
    private String tftGlassId;
    private String cfGlassId;
    private String cfPanelId;
    private String midGladdId;
    private String traceLevel;
    private Date caldDate;
    private String shfId;
    private Integer hourKeyFk;
    private String link_key;
    private String prod_spec_ver;

    @Basic
    @Column(name = "cald_date")
    @JSONField(format = "yyyy-MM-dd")
    public Date getCaldDate() {
        return caldDate;
    }

    public void setCaldDate(Date caldDate) {
        this.caldDate = caldDate;
    }


    @Basic
    @Column(name = "shf_id")
    public String getShfId() {
        return shfId;
    }

    public void setShfId(String shfId) {
        this.shfId = shfId;
    }

    @Basic
    @Column(name = "hour_key_fk")
    public Integer getHourKeyFk() {
        return hourKeyFk;
    }

    public void setHourKeyFk(Integer hourKeyFk) {
        this.hourKeyFk = hourKeyFk;
    }


    @Basic
    @Column(name = "unq_seq_id")
    public String getUnqSeqId() {
        return unqSeqId;
    }

    public void setUnqSeqId(String unqSeqId) {
        this.unqSeqId = unqSeqId;
    }

    @Basic
    @Column(name = "etl_timestamp")
    public Timestamp getEtlTimestamp() {
        return etlTimestamp;
    }

    public void setEtlTimestamp(Timestamp etlTimestamp) {
        this.etlTimestamp = etlTimestamp;
    }

    @Basic
    @Column(name = "etl_event_node")
    public String getEtlEventNode() {
        return etlEventNode;
    }

    public void setEtlEventNode(String etlEventNode) {
        this.etlEventNode = etlEventNode;
    }

    @Basic
    @Column(name = "etl_event_name")
    public String getEtlEventName() {
        return etlEventName;
    }

    public void setEtlEventName(String etlEventName) {
        this.etlEventName = etlEventName;
    }

    @Basic
    @Column(name = "etl_evt_seq_id")
    public String getEtlEvtSeqId() {
        return etlEvtSeqId;
    }

    public void setEtlEvtSeqId(String etlEvtSeqId) {
        this.etlEvtSeqId = etlEvtSeqId;
    }

    @Id
    @Column(name = "glass_id")
    public String getGlassId() {
        return glassId;
    }

    public void setGlassId(String glassId) {
        this.glassId = glassId;
    }

    @Basic
    @Column(name = "ope_key")
    public int getOpeKey() {
        return opeKey;
    }

    public void setOpeKey(int opeKey) {
        this.opeKey = opeKey;
    }

    @Id
    @Column(name = "ope_id")
    public String getOpeId() {
        return opeId;
    }

    public void setOpeId(String opeId) {
        this.opeId = opeId;
    }

    @Basic
    @Column(name = "shop_key_fk")
    public int getShopKeyFk() {
        return shopKeyFk;
    }

    public void setShopKeyFk(int shopKeyFk) {
        this.shopKeyFk = shopKeyFk;
    }

    @Id
    @Column(name = "shop_id")
    public String getShopId() {
        return shopId;
    }

    public void setShopId(String shopId) {
        this.shopId = shopId;
    }

    @Basic
    @Column(name = "prod_key")
    public int getProdKey() {
        return prodKey;
    }

    public void setProdKey(int prodKey) {
        this.prodKey = prodKey;
    }

    @Basic
    @Column(name = "prod_id")
    public String getProdId() {
        return prodId;
    }

    public void setProdId(String prodId) {
        this.prodId = prodId;
    }

    @Id
    @Column(name = "eqpt_id")
    public String getEqptId() {
        return eqptId;
    }

    public void setEqptId(String eqptId) {
        this.eqptId = eqptId;
    }

    @Id
    @Column(name = "sub_eqpt_id")
    public String getSubEqptId() {
        return subEqptId;
    }

    public void setSubEqptId(String subEqptId) {
        this.subEqptId = subEqptId;
    }

    @Id
    @Column(name = "unit_eqpt_id")
    public String getUnitEqptId() {
        return unitEqptId;
    }

    public void setUnitEqptId(String unitEqptId) {
        this.unitEqptId = unitEqptId;
    }

    @Basic
    @Column(name = "eqpt_port_id")
    public String getEqptPortId() {
        return eqptPortId;
    }

    public void setEqptPortId(String eqptPortId) {
        this.eqptPortId = eqptPortId;
    }

    @Basic
    @Column(name = "recipe_id")
    public String getRecipeId() {
        return recipeId;
    }

    public void setRecipeId(String recipeId) {
        this.recipeId = recipeId;
    }

    @Basic
    @Column(name = "ac_recipe_id")
    public String getAcRecipeId() {
        return acRecipeId;
    }

    public void setAcRecipeId(String acRecipeId) {
        this.acRecipeId = acRecipeId;
    }

    @Basic
    @Column(name = "evt_cate")
    public String getEvtCate() {
        return evtCate;
    }

    public void setEvtCate(String evtCate) {
        this.evtCate = evtCate;
    }

    @Basic
    @Column(name = "evt_usr")
    public String getEvtUsr() {
        return evtUsr;
    }

    public void setEvtUsr(String evtUsr) {
        this.evtUsr = evtUsr;
    }

    @Basic
    @Column(name = "in_timestamp")
    public Timestamp getInTimestamp() {
        return inTimestamp;
    }

    public void setInTimestamp(Timestamp inTimestamp) {
        this.inTimestamp = inTimestamp;
    }

    @Id
    @Column(name = "out_timestamp")
    public Timestamp getOutTimestamp() {
        return outTimestamp;
    }

    public void setOutTimestamp(Timestamp outTimestamp) {
        this.outTimestamp = outTimestamp;
    }

    @Basic
    @Column(name = "evt_timestamp")
    public Timestamp getEvtTimestamp() {
        return evtTimestamp;
    }

    public void setEvtTimestamp(Timestamp evtTimestamp) {
        this.evtTimestamp = evtTimestamp;
    }

    @Basic
    @Column(name = "evt_note")
    public String getEvtNote() {
        return evtNote;
    }

    public void setEvtNote(String evtNote) {
        this.evtNote = evtNote;
    }

    @Basic
    @Column(name = "base_id")
    public String getBaseId() {
        return baseId;
    }

    public void setBaseId(String baseId) {
        this.baseId = baseId;
    }

    @Basic
    @Column(name = "mes_timestamp")
    public Timestamp getMesTimestamp() {
        return mesTimestamp;
    }

    public void setMesTimestamp(Timestamp mesTimestamp) {
        this.mesTimestamp = mesTimestamp;
    }

    @Basic
    @Column(name = "lot_id")
    public String getLotId() {
        return lotId;
    }

    public void setLotId(String lotId) {
        this.lotId = lotId;
    }

    @Basic
    @Column(name = "carrier_name")
    public String getCarrierName() {
        return carrierName;
    }

    public void setCarrierName(String carrierName) {
        this.carrierName = carrierName;
    }

    @Basic
    @Column(name = "position")
    public Integer getPosition() {
        return position;
    }

    public void setPosition(Integer position) {
        this.position = position;
    }

    @Basic
    @Column(name = "link_key")
    public String getLink_key() {
        return link_key;
    }

    public void setLink_key(String link_key) {
        this.link_key = link_key;
    }
    @Basic
    @Column(name = "prod_spec_ver")
    public String getProd_spec_ver() {
        return prod_spec_ver;
    }

    public void setProd_spec_ver(String prod_spec_ver) {
        this.prod_spec_ver = prod_spec_ver;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        WppCunitHis that = (WppCunitHis) o;
        return opeKey == that.opeKey &&
                shopKeyFk == that.shopKeyFk &&
                prodKey == that.prodKey &&
                Objects.equals(unqSeqId, that.unqSeqId) &&
                Objects.equals(etlTimestamp, that.etlTimestamp) &&
                Objects.equals(etlEventNode, that.etlEventNode) &&
                Objects.equals(etlEventName, that.etlEventName) &&
                Objects.equals(etlEvtSeqId, that.etlEvtSeqId) &&
                Objects.equals(glassId, that.glassId) &&
                Objects.equals(opeId, that.opeId) &&
                Objects.equals(shopId, that.shopId) &&
                Objects.equals(prodId, that.prodId) &&
                Objects.equals(eqptId, that.eqptId) &&
                Objects.equals(subEqptId, that.subEqptId) &&
                Objects.equals(unitEqptId, that.unitEqptId) &&
                Objects.equals(eqptPortId, that.eqptPortId) &&
                Objects.equals(recipeId, that.recipeId) &&
                Objects.equals(acRecipeId, that.acRecipeId) &&
                Objects.equals(evtCate, that.evtCate) &&
                Objects.equals(evtUsr, that.evtUsr) &&
                Objects.equals(inTimestamp, that.inTimestamp) &&
                Objects.equals(outTimestamp, that.outTimestamp) &&
                Objects.equals(evtTimestamp, that.evtTimestamp) &&
                Objects.equals(evtNote, that.evtNote) &&
                Objects.equals(baseId, that.baseId) &&
                Objects.equals(mesTimestamp, that.mesTimestamp) &&
                Objects.equals(lotId, that.lotId) &&
                Objects.equals(link_key, that.link_key) &&
                Objects.equals(prod_spec_ver, that.prod_spec_ver) &&
                Objects.equals(carrierName, that.carrierName) &&
                Objects.equals(position, that.position) &&
                Objects.equals(tftGlassId, that.tftGlassId) &&
                Objects.equals(cfGlassId, that.cfGlassId) &&
                Objects.equals(cfPanelId, that.cfPanelId) &&
                Objects.equals(midGladdId, that.midGladdId) &&
                Objects.equals(traceLevel, that.traceLevel) &&
                Objects.equals(caldDate, that.caldDate) &&
                Objects.equals(shfId, that.shfId) &&
                Objects.equals(hourKeyFk, that.hourKeyFk);
    }

    @Override
    public int hashCode() {

        return Objects.hash(unqSeqId, etlTimestamp, etlEventNode, etlEventName, etlEvtSeqId, glassId, opeKey, opeId, shopKeyFk, shopId, prodKey, prodId, eqptId, subEqptId, unitEqptId, eqptPortId, recipeId, acRecipeId, evtCate, evtUsr, inTimestamp, outTimestamp, evtTimestamp, evtNote, baseId, mesTimestamp, lotId,link_key,prod_spec_ver, carrierName, position, tftGlassId, cfGlassId, cfPanelId, midGladdId, traceLevel, caldDate, shfId, hourKeyFk);
    }

    @Basic
    @Column(name = "tft_glass_id")
    public String getTftGlassId() {
        return tftGlassId;
    }

    public void setTftGlassId(String tftGlassId) {
        this.tftGlassId = tftGlassId;
    }

    @Basic
    @Column(name = "cf_glass_id")
    public String getCfGlassId() {
        return cfGlassId;
    }

    public void setCfGlassId(String cfGlassId) {
        this.cfGlassId = cfGlassId;
    }

    @Basic
    @Column(name = "cf_panel_id")
    public String getCfPanelId() {
        return cfPanelId;
    }

    public void setCfPanelId(String cfPanelId) {
        this.cfPanelId = cfPanelId;
    }

    @Basic
    @Column(name = "mid_gladd_id")
    public String getMidGladdId() {
        return midGladdId;
    }

    public void setMidGladdId(String midGladdId) {
        this.midGladdId = midGladdId;
    }

    @Basic
    @Column(name = "trace_level")
    public String getTraceLevel() {
        return traceLevel;
    }

    public void setTraceLevel(String traceLevel) {
        this.traceLevel = traceLevel;
    }
}
